package com.zhuangjie.coupon.enums;

import com.zhuangjie.mvc.validator.annotate.enum_valid.VerifiableEnum;

/**
 * 优惠券产品状态
 */
public enum CouponProductStatus implements VerifiableEnum {
    UNBUYABLE((byte) 0, "不可买"),
    BUYABLE((byte) 1, "可买");

    private final byte code;
    private final String name;

    CouponProductStatus(byte code, String name) {
        this.code = code;
        this.name = name;
    }

    public byte getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    @Override
    public byte getValue() {
        return getCode();
    }
}